﻿using System.ComponentModel.Composition;
using Microsoft.Practices.Prism.Commands;

namespace IntoNails.Infrastructure
{
	/// <summary>
	/// Description of GlobalCommands.
	/// </summary>
	public static class GlobalCommands
	{
        private static CompositeCommand writeAuditLogCommand = new CompositeCommand();
	    private static CompositeCommand showViewCommand = new CompositeCommand();
	    private static CompositeCommand updateProgressCommand = new CompositeCommand();

	    public static CompositeCommand WriteAuditLogCommand
	    {
            get { return writeAuditLogCommand; }
            set { writeAuditLogCommand = value; }
	    }

        public static CompositeCommand ShowViewCommand
        {
            get { return showViewCommand; }
            set { showViewCommand = value; }
        }

        public static CompositeCommand UpdateProgressCommand
        {
            get { return updateProgressCommand; }
            set { updateProgressCommand = value; }
        }
	}

    [Export]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class GlobalCommandProxy
    {
        public virtual CompositeCommand WriteAuditLogCommand
        {
            get { return GlobalCommands.WriteAuditLogCommand; }
        }

        public virtual CompositeCommand ShowViewCommand
        {
            get { return GlobalCommands.ShowViewCommand; }
        }

        public virtual CompositeCommand UpdateProgressCommand
        {
            get { return GlobalCommands.UpdateProgressCommand; }
        }
    }
}
